{% extends "blog/base.html" %}

{% block title %}Share a post{% endblock %}

{% block content %}
{% if sent %}
<h1>E-mail successfully sent</h1>
<p>"{{ post.title }}" was successfully sent to {{ cd.to }}</p>
{% else %}
<h1>Share "{{ post.title }}" by e-mail</h1>
<form action="." method="post">
    {{ form.as_p }}
    {% csrf_token %}
    <input type="submit" value="Send email">
</form>
{% endif %}
{% endblock %}